<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img src="http://img1.qunarzz.com/sight/p0/1709/e9/e9b7ae23f567806ea3.img.jpg_600x330_339bdee5.jpg" alt="">
      <div class="banner-info">
        <div class="banner-info-title">少林寺(AAAAA景区)</div>
        <div class="banner-info-number"><i class="iconfont icon-pic"></i>36</div>
      </div>
    </div>
    <common-gallary :imgs="imgs" v-show="showGallary" @hideGallary="handleGallaryHide"></common-gallary>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  components: {
    CommonGallary
  },
  data () {
    return {
      showGallary: false,
      imgs: [
        'http://img1.qunarzz.com/sight/p0/1709/e9/e9b7ae23f567806ea3.img.jpg_600x330_339bdee5.jpg', 'http://img1.qunarzz.com/sight/p0/1709/8c/8c90d360e818ed38a3.img.jpg_r_800x800_bcee8771.jpg', 'http://img1.qunarzz.com/sight/p0/1709/68/68fa0b5cca90a963a3.img.jpg_r_800x800_f22092ca.jpg', 'http://img1.qunarzz.com/sight/p0/1709/27/2779d093cfdbff30a3.img.jpg_r_800x800_196c6751.jpg', 'http://img1.qunarzz.com/sight/p0/1709/ba/ba8e0a533c7794eba3.img.jpg_r_800x800_9cb89e62.jpg'
      ]
    }
  },
  methods: {
    handleBannerClick () {
      this.showGallary = true
    },
    handleGallaryHide () {
      this.showGallary = false
    }
  }
}
</script>

<style lang="stylus" scoped>
  .banner
    position relative
    overflow hidden
    height 0
    padding-bottom 55%
    img
      width 100%
    &-info
      position absolute
      bottom 0
      left 0
      right 0
      height .6rem
      display flex
      align-items center
      color #fff
      font-size .25rem
      padding 0 .2rem
      background linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.7))
      &-title
        flex 1
      &-number
        flex 0 0 .6rem
        font-size .2rem
        i
          font-size .25rem
          margin-right .1rem
          vertical-align middle
</style>
